// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import axios from './util/http'
import 'babel-polyfill'
import elementUI from 'element-ui'
import apis from './config/api'
import VueLazyload from 'vue-lazyload'

// 引入第三方样式
import 'normalize.css'
import './theme/index.css'
import 'swiper/dist/css/swiper.css'
import './assets/scss/basic.scss'
import './assets/scss/common.scss'

// 引入过滤器
import { priceFormat1, priceFormat2 } from './util/filter'

Vue.prototype.$api = apis
Vue.prototype.$pay = 'http://pay.teayk.com/' // 支付接口域名
axios.defaults.withCredentials = true
Vue.prototype.$http = axios
Vue.filter('priceFormat1', priceFormat1)
Vue.filter('priceFormat2', priceFormat2)

Vue.config.productionTip = false

Vue.use(elementUI)
Vue.use(VueLazyload, {
  preload: 1.3
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
